import React from 'react'
import ConnectingButton from './ConnectingButton'
//导航组件 跳转
import {useNavigate} from 'react-router-dom';
const ConnectingButtons = () => {
    let navigate = useNavigate();
    const pushToJoinRoomPage = () => {
        navigate('/join-room');
    }
    const pushToJoinRoomPageAsHost = () => {
        navigate('/join-room?host=true');
    }
  return (
    <div className='connecting_buttons_container'>
        <ConnectingButton buttonText='加入会议' onClickHandler={pushToJoinRoomPage} />
        <ConnectingButton createRoomButton buttonText='主持会议' onClickHandler={pushToJoinRoomPageAsHost} />
    </div>
  )
}

export default ConnectingButtons